package sheepmixView.client.model;

import android.content.Context;
import android.telephony.TelephonyManager;


public class Util {
	public static String IMEI;
	
	public static String setIMEI(Context c){
		
		String serviceName = Context.TELEPHONY_SERVICE;

		TelephonyManager m_telephonyManager = (TelephonyManager)c.getSystemService(serviceName);
	
		return IMEI = m_telephonyManager.getDeviceId();
		
	}
	
	public static String getIMEI() throws NoSuchFieldException{
		if(IMEI != null)
			return IMEI;
		else
			throw new NoSuchFieldException("IMEI unknown");
	}
}
